package cn.lili.event.impl;

import cn.lili.event.UserRegisterEvent;
import cn.lili.modules.member.entity.dos.User;
import cn.lili.modules.promotion.client.CouponActivityClient;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Component;

/**
 * 注册赠券活动
 *
 * @author Bulbasaur
 * @since 2021/5/24 10:48 上午
 */
@Component
@RequiredArgsConstructor
public class RegisteredCouponActivityExecute implements UserRegisterEvent {

    private final CouponActivityClient couponActivityClient;

    /**
     * 获取进行中的注册赠券的优惠券活动 发送注册赠券
     *
     * @param member 会员
     */
    @Override
    public void userRegister(User member) {
        couponActivityClient.registered(member);
    }
}
